home *** CD-ROM | disk | FTP | other *** search
- /*
- * FRAME.C A general-purpose bitmap creating library. It allows you
- * to select a portion of any screen by dragging a selection
- * rectangle, and returns a bitmap structure that contains
- * a copy of the selected region.
- *
- * Copyright 1990 by Davide P. Cervone, all rights reserved.
- * You may use this code, provided this copyright notice is kept intact.
- */
-
- #define SHOW_USAGE 0
- #define JUST_EXIT 1
- #define FRAME_IT 2
-
- #define ONE 1L
-
- #define NEWSTRUCT(s,v) (v=(struct s *)New("v",sizeof(struct s)))
- #define FREESTRUCT(s,v) (FreeMem(v,sizeof(struct s)))
-
- extern struct IntuitionBase *IntuitionBase;
- extern struct GfxBase *GfxBase;
- extern struct LayersBase *LayersBase;
-
- extern char *program;
- extern char *version;
- extern char *copyright;
- extern char *usage;
-
- extern struct Screen *theScreen; /* the selected screen */
- extern UBYTE PlaneMask; /* which bitplanes to use */
- extern UBYTE theDepth; /* the depth of the bitmap */
- extern WORD theWidth, theHeight; /* its width and height */
- extern ULONG theModes; /* the screen's modes */
- extern struct ColorMap *theColorMap; /* the screen's color map */
- extern struct RastPort *theRastPort; /* a RastPort into the bitmap */
- extern struct BitMap theBitMap; /* the bitmap itself */
- extern WORD StartX, StartY; /* position within the screen */
- extern WORD CurrentX, CurrentY; /* current mouse position */
- extern WORD LeftX, TopY; /* corner of selection rectangle */
-
- extern APTR New(); /* gets memory safely */
-